package cn.edu.cug.cs.gtl.renders.openinventor;

import cn.edu.cug.cs.gtl.apis.render.Factory;
import cn.edu.cug.cs.gtl.apis.render.Render;
import cn.edu.cug.cs.gtl.apis.render.Tune;
import cn.edu.cug.cs.gtl.apis.render.nodes.*;
import cn.edu.cug.cs.gtl.apis.render.paths.Path;
import cn.edu.cug.cs.gtl.protos.Point3D;
import cn.edu.cug.cs.gtl.protos.Vertex3d;
import cn.edu.cug.cs.gtl.renders.openinventor.nodes.GradientBackgroundImpl;
import cn.edu.cug.cs.gtl.renders.openinventor.nodes.GroupImpl;
import cn.edu.cug.cs.gtl.renders.openinventor.nodes.SelectionImpl;
import cn.edu.cug.cs.gtl.renders.openinventor.nodes.SeparatorImpl;
import cn.edu.cug.cs.gtl.renders.openinventor.paths.PathImpl;
import com.openinventor.inventor.nodes.SoNode;

public class FactoryImpl implements Factory {
    @Override
    public Render createRender() {
        return new RenderImpl();
    }

    @Override
    public Separator createSeparator() {
        return new SeparatorImpl();
    }

    @Override
    public Tune createTune() {
        return new TuneImpl();
    }

    @Override
    public GradientBackground createGradientBackground() {
        return new GradientBackgroundImpl();
    }

    @Override
    public Group createGroup() {
        return new GroupImpl();
    }

    @Override
    public Point3D createPoint3D(double x, double y, double z) {
        return Point3D.newBuilder().setLocation(Vertex3d.newBuilder().setX(x).setY(y).setZ(z).build()).build();
    }

    @Override
    public Path createPath() {
        return new PathImpl();
    }


    @Override
    public Selection createSelection() {
        return new SelectionImpl();
    }


}